package io.lvdaxian.mybatis10.executor.result;

import io.lvdaxian.mybatis10.session.ResultContext;

/**
 * 默认的结果处理的 上下文
 *
 * @author lihh
 */
public class DefaultResultContext implements ResultContext {
  
  private Object resultObject;
  private int resultCount;
  
  public DefaultResultContext() {
    this.resultObject = null;
    this.resultCount = 0;
  }
  
  @Override
  public Object getResultObject() {
    return resultObject;
  }
  
  @Override
  public int getResultCount() {
    return resultCount;
  }
  
  public void nextResultObject(Object resultObject) {
    resultCount++;
    this.resultObject = resultObject;
  }
}
